001    package videoautomat.contentcreator.stdactions;
002    
003    import sale.Action;
004    import sale.GateChangeTransition;
005    import sale.SaleProcess;
006    import sale.SalesPoint;
007    import sale.UIGate;
008    
009    /**
010     * Standard action to change to stop gate.
011     * 
012     * @author Alexander Herrmann
013     *
014     */
015    public class StopAction implements Action {
016        
017        /**
018         * Changes to the stop gate. Called by an action listener, such as an button.
019         * The attribues are set by the action listener.
020         * @param saleProcess - current {@link sale.SaleProcess}
021         * @param salePoint   - current {@link sale.SalesPoint}
022         */
023        public void doAction(SaleProcess saleProcess, SalesPoint salePoint) throws Throwable {
024            UIGate currentGate = (UIGate)saleProcess.getCurrentGate();
025            currentGate.setNextTransition(GateChangeTransition.CHANGE_TO_STOP_GATE);
026         }
027        
028    }